package com.bossien.flink.common;

import com.bossien.flink.config.ExecutionEnviromention;
import com.bossien.flink.config.StreamEnvironmention;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 *@author 胡春林
 *  初始化环境
 */
@Component
public class InitializationExcutionEnviroment {

    @Bean(initMethod="init",destroyMethod="destory")
    public StreamEnvironmention streamEnvironmention() { return new StreamEnvironmention(); }

    @ConditionalOnMissingBean
    @Bean(initMethod="init",destroyMethod="destory")
    public ExecutionEnviromention executionEnviromention() { return new ExecutionEnviromention(); }

}
